(function () {
    window.VComponent = class VComponent extends VElement {
        constructor(options) {
            super(getRoot(options.el))
            const that = this;

            const proxy = new Proxy(options.data(),{
                get(target, p) {
                    assert(p in target, `${p} is not default`)
                    return target[p]
                },
                set(target, p, value) {
                    target[p] = value
                    that.render()
                    return true
                }
            })

            this.render()
            return proxy;
        }
        render(){
            this._children.forEach(child=>child.render())
        }
    }
})()